# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Timothy Redaelli <timothy.redaelli@gmail.com>
# Contributor: Rudy Matela <rudy.matela@gmail.com>

pkgname=packeth
pkgver=2.1
pkgrel=2
pkgdesc='Linux GUI packet generator tool for ethernet'
url='http://packeth.sourceforge.net/'
arch=('loong64' 'x86_64')
license=('GPL')
depends=('gtk2')
source=(https://github.com/jemcek/packETH/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz)
sha512sums=('55be4a2eb517c1d040664ea1a16d59dab20b06edbbd073cbf709deb4dfcec8d8eb12b88dfbd578f9bdb0ca614036ac4bbb00be6f865b774da2aa62ce8d3d767e')

prepare() {
  cd packETH-${pkgver}
  autoreconf -fiv
}

build() {
  cd packETH-${pkgver}
  CFLAGS+=' -fcommon' # https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common
  ./configure --prefix=/usr
  make
}

package() {
  cd packETH-${pkgver}
  make DESTDIR="${pkgdir}" install
}

# vim: ts=2 sw=2 et:
